import http from './request.js'

// 上传文件（图片，文件通用）
export function aiUpload(filePath, formData) {
	return http.upload("/api/upload", filePath, formData, {
		name: 'file'
	})
}
// 创建会话（带对话模式如私教）
export function aiAddSessionMode(data) {
	return http.post('/api/chat/conversations/with-mode', data, {
		showLoading: false
	})
}
// 发送消息
export function aiSendMessage(data) {
	return http.post(`/api/chat/conversations/messages/async`, data, {
		showLoading: false
	})
}
// 获取会话消息列表
export function aiSessionMessages(id, data) {
	return http.get(`/api/chat/conversations/${id}/messages`, data, {
		showLoading: false
	})
}
// tts播放
export function aiTTS(data) {
	return http.post("/api/tts/synthesize", data, {
		showLoading: true
	})
}
// 获取通用热搜
export function aiHots() {
	return http.get("/api/chat/askMessage")
}
// 获取短文配置
export function aiQuerys(data) {
	return http.get("/api/chat/getNovels",data, {
		showLoading: true
	})
}